home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / arcers / tar316.zip / QIC02.H < prev    next >
Text File  |  1980-07-24  |  3KB  |  75 lines

  1. #ifndef Q2_SELECT
  2. /* QIC-02 commnad subset */
  3. #define Q2_SELECT       0x01    /* select the drive */
  4. #define Q2_REWIND       0x21    /* rewind tape */
  5. #define Q2_ERASE        0x22    /* erase tape */
  6. #define Q2_RETENSION    0x24    /* wind tape back and forth */
  7. #define Q2_QIC11        0x26    /* select QIC-11 format */
  8. #define Q2_QIC24        0x27    /* select QIC-24 format */
  9. #define Q2_QIC120       0x28    /* select QIC-120 format */
  10. #define Q2_QIC150       0x29    /* select QIC-150 format */
  11. #define Q2_WRDATA       0x40    /* write data */
  12. #define Q2_WRMARK       0x60    /* write file mark */
  13. #define Q2_RDDATA       0x80    /* read data */
  14. #define Q2_FORWARD      0x81    /* forward space block */
  15. #define Q2_REVERSE      0x81    /* backward space block */
  16. #define Q2_RDMARK       0xA0    /* seek forward for data mark */
  17. #define Q2_RDSTAT       0xC0    /* read status */
  18.  
  19. /* Error/status bits */
  20. #define Q2_ERRFLAG 0x80 /* if present shows that info in byte is valid */
  21. #define Q2_ERRMASK 0x7f
  22.  
  23. #define Q2E_POR  0x0001 /* power-on/reset occured */
  24. #define Q2E_ERM  0x0002 /* end of recorded media */
  25. #define Q2E_BUS  0x0004 /* bus parity error */
  26. #define Q2E_BOM  0x0008 /* beginning of media */
  27. #define Q2E_MBD  0x0010 /* marginal block detected */
  28. #define Q2E_NDT  0x0020 /* no data detected */
  29. #define Q2E_ILL  0x0040 /* illegal command */
  30. #define Q2E_DEAD 0x0080 /* cannot get status from controller */
  31. #define Q2E_FIL  0x0100 /* file mark detected */
  32. #define Q2E_BNL  0x0200 /* block not located */
  33. #define Q2E_UDA  0x0400 /* unrecoverable data error */
  34. #define Q2E_EOM  0x0800 /* end of media */
  35. #define Q2E_WRP  0x1000 /* write protected */
  36. #define Q2E_DFF  0x2000 /* device fault */
  37. #define Q2E_CNI  0x4000 /* cartridge not in place */
  38. #define Q2E_BUSY 0x8000 /* device is not ready */
  39.  
  40. #define Q2E_HARD 0xE6E6 /* hard errors */
  41. #define Q2E_STOP 0xE0C4 /* fatal errors */
  42.  
  43. extern char **qic02_errlist;
  44. extern int  qic02_nerr;
  45.  
  46. #define CTE_DEAD   8
  47. #define CTE_BUSY   16
  48. #define CTE_CLOSED 17
  49. #define CTE_OPENED 18
  50. #define CTE_FAULT (-1)
  51.  
  52. #ifndef BYTE
  53. #    define BYTE unsigned char
  54. #endif
  55. #ifndef WORD
  56. #    define WORD unsigned short
  57. #endif
  58.  
  59. struct qic02_byte_status {
  60.    BYTE status_hi, status_lo;
  61.    BYTE error_cnt_hi, error_cnt_lo;
  62.    BYTE underrun_cnt_hi, underrun_cnt_lo;
  63. };
  64.  
  65. struct qic02_word_status {
  66.    WORD status, error_cnt, underrun_cnt;
  67. };
  68.  
  69. struct init_data {
  70.    WORD base_address, dma_number, irq_number;
  71. };
  72.  
  73. #define UNUSED (WORD)~0
  74. #endif
  75.